import { getCurrentInstance } from 'vue';

/*
 * 获取全局挂载实例
 * 如果使用了app.config.globalProperties.$xxx = xxx
 * 则使用此hooks获取
 * ler xxx = useProperties(propertiesName)
 * */
export const useProperties = (propertiesName) => {
  const instance = getCurrentInstance();
  return instance?.appContext?.config?.globalProperties[propertiesName] ?? undefined;
};
